﻿using GroupProject.Adapters.Adapters;
using GroupProject.Adapters.Interfaces;
using GroupProject.Data.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace GroupProject.Controllers
{
    public class CourseController : Controller
    {
        private ICoursesAdapter _adapter;

        public CourseController()
        {
            _adapter = new CoursesAdapter();
        }

        public CourseController(ICoursesAdapter a)
        {
            _adapter = a;
        }

        // GET: Course
        public ActionResult Index()
        {
            List<Course> model = _adapter.GetAllCourses();
            return View(model);
        }
    }
}